<?php

namespace App\Models;

use App\Utils\ConstantUtil;
use Illuminate\Database\Eloquent\Model;

class AuthRole extends Model
{
    protected $table = 'auth_roles';
    protected $appends = [
        'status_name' ,
    ];

    public function getStatusNameAttribute()
    {
        switch ($this->status) {
            case ConstantUtil::USER_STATUS_TRUE:
                return "启用";
                break;
            case ConstantUtil::USER_STATUS_FALSE :
                return "禁用";
                break;
        }
    }
}
